import { request } from '../../utils/request'

export const getAllAlumnia = (openid) => {
  return request({
    url: '/alumnia/association/app/listWithMe',
    method: 'GET',
    data: {
      openid,
      status: 1
    }
  })
}
export const joinAlumnia = (params) => {
  return request({
    url: '/alumnia/association/user',
    method: 'post',
    data: params
  })
}

export const exitAlumnia = (params) => {
  return request({
    url: `/alumnia/association/user/delete`,
    method: 'post',
    data: params
  })
}

export const getDetail = (id, openId) => {
  return request({
    url: `/alumnia/association/app/detail`,
    method: 'get',
    data: {
      openid: openId,
      associationId: id
    }
  })
}

export const getActive = (id, openId) => {
  return request({
    url: `/alumnia/association/app/detail`,
    method: 'get',
    data: {
      openid: openId,
      associationId: id
    }
  })
}